package org.example.service;

import org.example.entity.ProductEntity;
import org.example.util.ResponseEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author 韩家丰
 * @date 2021/5/4 14:34
 * @desc todo
 */
@Service("productService")
@FeignClient(name = "service-product")
public interface IProductService {

    /**
     * 根据id查询产品
     *
     * @param id 产品id
     * @return 产品
     */
    @PostMapping("product/getById")
    ResponseEntity<ProductEntity> getById(@RequestBody Integer id);
}
